load(
    "//tools/skylark:drake_cc.bzl",
    "drake_cc_googletest",
)
load("//tools/skylark:drake_data.bzl", "models_filegroup")
load("//tools/install:install_data.bzl", "install_data")
load("//tools/lint:lint.bzl", "add_lint_tests")

package(default_visibility = ["//visibility:public"])

models_filegroup(
    name = "glob_models",
    visibility = ["//visibility:private"],
)

install_data(
    name = "install_data",
    data = [":glob_models"],
)

filegroup(
    name = "models",
    srcs = [
        ":glob_models",
        "@drake_models//:ycb/meshes/003_cracker_box_textured.mtl",
        "@drake_models//:ycb/meshes/003_cracker_box_textured.obj",
        "@drake_models//:ycb/meshes/003_cracker_box_textured.png",
        "@drake_models//:ycb/meshes/004_sugar_box_textured.mtl",
        "@drake_models//:ycb/meshes/004_sugar_box_textured.obj",
        "@drake_models//:ycb/meshes/004_sugar_box_textured.png",
        "@drake_models//:ycb/meshes/005_tomato_soup_can_textured.mtl",
        "@drake_models//:ycb/meshes/005_tomato_soup_can_textured.obj",
        "@drake_models//:ycb/meshes/005_tomato_soup_can_textured.png",
        "@drake_models//:ycb/meshes/006_mustard_bottle_textured.mtl",
        "@drake_models//:ycb/meshes/006_mustard_bottle_textured.obj",
        "@drake_models//:ycb/meshes/006_mustard_bottle_textured.png",
        "@drake_models//:ycb/meshes/009_gelatin_box_textured.mtl",
        "@drake_models//:ycb/meshes/009_gelatin_box_textured.obj",
        "@drake_models//:ycb/meshes/009_gelatin_box_textured.png",
        "@drake_models//:ycb/meshes/010_potted_meat_can_textured.mtl",
        "@drake_models//:ycb/meshes/010_potted_meat_can_textured.obj",
        "@drake_models//:ycb/meshes/010_potted_meat_can_textured.png",
    ],
)

# === test/ ===

drake_cc_googletest(
    name = "parse_test",
    data = [":models"],
    deps = [
        "//common:find_resource",
        "//common:scope_exit",
        "//geometry:meshcat_visualizer",
        "//geometry/test_utilities:meshcat_environment",
        "//multibody/parsing",
        "//multibody/plant",
        "//systems/analysis:simulator",
    ],
)

add_lint_tests()
